﻿using System;

namespace ConsoleApp4
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("请输入工号:");
            string no = Console.ReadLine();
            Console.Write("请输入姓名:");
            string name = Console.ReadLine();
            DateTime entryTime = DateTime.Now;
            Console.Write("请输入部门:");
            string dept = Console.ReadLine();

            Employee e1 = new Employee(no, name, entryTime, dept);

            Console.WriteLine($"刚录入员工的信息如下:\n公司:{e1.Company}\n工号:{e1.No}\n姓名:{e1.Name}\n部门:{e1.Dept}\n入职时间:{e1.EntryTime}");

            Console.ReadKey();
        }
    }

    public class Employee
    {
        public string Company;
        private string no;
        public string No
        {
            get { return no; }
            set { No = value; }
        }

        public string Name { get => name; set => name = value; }
        public DateTime EntryTime { get => entryTime; set => entryTime = value; }
        public string Dept { get => dept; set => dept = value; }

        private string name;
        private DateTime entryTime;
        private string dept;

        public Employee()
        {
            Company = "NESUOFT";
        }
        public Employee(string no, string name, DateTime entryTime, string dept)
        {
            Company = "NESUOFT";
            this.no = no;
            this.name = name;
            this.entryTime = entryTime;
            this.dept = dept;
        }
    }


}
